<template>
    <section class="withdrawal-record-mian base-main bgcFFF">
      <pull-up-reload
        :on-infinite-load="onInfiniteLoad"
        :parent-pull-up-state="infiniteLoadData.pullUpState"
        style="padding-bottom: 0px;">
        <ul>
          <li class="line-bottom" v-for="(item, index) in data" :key="index">
            <div class="li-l w70 inline-block">
              <p class="color45454D fs16">提现 {{item.bank}} (尾号{{item.tailNumber}})</p>
              <p class="color999AA3 fs12">{{item.time}}</p>
            </div>
            <div class="li-r w30 text-r inline-block">
              <p class="color45454D fs16">{{item.amount}}</p>
              <p class="fs12" :class="item.status == 1 ? 'color999AA3' : (item.status == 2 ? 'color7E82F6' : 'colorF54E4E')">{{item.type}}</p>
            </div>
          </li>
        </ul>
      </pull-up-reload>
    </section>
</template>

<script type="text/ecmascript-6">
  import PullUpReload from '../../components/PullUpReload.vue'

  export default {
    components:{
      PullUpReload
    },
    data() {
      return {
        data:[
          {
            bank:'中国银行',
            tailNumber:'1234',
            time:'2019-06-23 10:30:24',
            amount:'200.00',
            type:'提现成功',
            status:'1',
          },
          {
            bank:'工商银行',
            tailNumber:'1234',
            time:'2019-06-23 10:30:24',
            amount:'200.00',
            type:'提现中',
            status:'2',
          },
          {
            bank:'中国银行',
            tailNumber:'1234',
            time:'2019-06-23 10:30:24',
            amount:'200.00',
            type:'提现失败',
            status:'3',
          }

        ],//数据

        page:0,
        // 上拉加载的设置
        infiniteLoadData: {
          initialShowNum: 6, // 初始显示多少条
          everyLoadingNum: 6, // 每次加载的个数
          pullUpState: 0, // 子组件的pullUpState状态
          pullUpList: [], // 上拉加载更多数据的数组
          showPullUpListLength: this.initialShowNum // 上拉加载后所展示的个数
        }
      }
    },
    methods: {

      // 上拉加载
      onInfiniteLoad (done) {
        if (this.infiniteLoadData.pullUpState === 0) {
//          this.getPullUpMoreData()
        }
        done()
      }
    },
  }
</script>

<style scoped lang="scss">
  @import "../../assets/css/withdrawalRecord.scss";
</style>
